using Jupiter.Infrastructure.Exceptions;
using Jupiter.Infrastructure.Responses;
using Wips.AppService.Authorities.Users.Requests;
using Wips.AppService.Authorities.Users.Responses;
using Wips.AppService.Authorities.Users.ViewModels;
using Wips.AppService.CommonViewModels;

namespace Wips.AppService.Authorities.Users
{
    /// <summary>
    /// 用户服务接口
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 读取分页列表
        /// </summary>
        /// <param name="request">请求类</param>
        /// <returns></returns>
        Task<PageResult<GetUserPagesResponse>> GetPagesAsync(GetUserPagesRequest request);

        /// <summary>
        /// 读取信息
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        Task<GetUserByIdResponse> GetByIdAsync(string id = null);


        /// <summary>
        /// 读取信息
        /// </summary>
        /// <param name="userName">帐户名</param>
        /// <returns></returns>
        Task<GetUserByUserNameResponse> GetByUserNameAsync(string userName);
        /// <summary>
        /// 读取信息
        /// </summary>
        /// <returns></returns>
        Task<GetUserByUserNameResponse> GetByTokenAsync();


        /// <summary>
        /// 读取信息
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="smsCode"></param>
        /// <returns></returns>
        /// <exception cref="CoreException"></exception>
        Task<GetUserByUserNameResponse> GetByUserNameAsync(string userName, string smsCode);




        /// <summary>
        /// 根据角色Id读取用户列表
        /// </summary>
        /// <param name="roleId">角色Id</param>
        /// <returns></returns>
        Task<List<string>> GetIdsByRoleIdAsync(string roleId);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        Task<GetUserResponse> GetUserAsync(string id);

        /// <summary>
        /// 读取用户数据
        /// </summary>
        /// <returns></returns>
        Task<List<SelectViewModel>> GetSelectDataAsync();


        /// <summary>
        /// 读取用户数据
        /// </summary>
        /// <returns></returns>
        Task<List<SelectViewModel>> GetSelectForChannelUserDataAsync();


        /// <summary>
        /// 获取账号菜单数据
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<UserAuthorityModel> GetAccountEnterprise(string userId);

        /// <summary>
        /// 获取Root账号菜单数据
        /// </summary>
        /// <returns></returns>
        Task<UserAuthorityModel> GetRootAccountEnterprise();




    }
}